﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Caching;
using Twipler.App.DataDoc;
using Twipler.App.Parse.Code;
using Twipler.Data.Access;
using Twipler.Data.Entity.Twipler;
using Twipler.Twitter;

namespace Twipler.App.Entity
{
	public class Infochimp : ICallableClass
	{
		public static IDataDoc Influence(string screen_name)
		{
			return new DataDocJson(
				() => GeneralPublic.Get(
				      	string.Format("http://api.infochimps.com/soc/net/tw/influence.json?screen_name={0}&apikey={1}&v=0.2",
				      	              screen_name,
				      	              Config.Setting("InfochimpKey", ""))));
									  
		}

		public static IDataDoc TrustRank(string screen_name)
		{
			return new DataDocJson(
				() => GeneralPublic.Get(
						string.Format("http://api.infochimps.com/soc/net/tw/trstrank.json?screen_name={0}&apikey={1}&v=0.2",
									  screen_name,
									  Config.Setting("InfochimpKey", ""))
									  ));
		}
	}
}
